1. Field of the Invention
The present invention relates to a numerical controller for controlling machine tools and industrial machines and, more particularly, to a numerical controller that can divide a memory in which to store machining programs or those in binary data format into memory areas and can combine divided memory areas.
2. Description of the Related Art
In a conventional well-known interpreter-type numerical controller, NC programs or machining programs in binary data format are stored in a memory in the numerical controller, and during an operation, the numerical controller performs analysis and preprocessing in a preprocessing part and executes the programs in an execution control part while reading the programs sequentially.
In many systems used for machining lines in factories, machining programs stored and managed in a personal computer are transferred to and stored in a memory in a numerical controller, and the machining programs stored in the memory are operated.
In a system often used when a standalone numerical controller, to which a personal computer or the like is not connected, is employed, machining programs stored and managed in a memory card or USB memory connected to the numerical controller or in a non-volatile memory in the numerical controller are transferred to and stored in another memory (such as a RAM) other than the non-volatile memory in the numerical controller, and the machining programs stored in the other memory are operated.
Each system described above is problematic in that when it is operated with conventional machining programs in such a way that after a first workpiece has been machined, a second workpiece is machined, the machining of the second workpiece must be awaited until a machining program for the second workpiece, which is stored and managed in the personal computer, in the memory card or USB card connected to the numerical controller, or in the volatile memory in the numerical controller, has been transferred to and stored in the other memory (such as a RAM) other than the non-volatile memory in the numerical controller. This problem can be solved by using a ring buffer in which an old program that has been operated is overwritten with a new machining program.
FIG. 11 illustrates a ring buffer of this type.
The ring buffer in FIG. 11 is formed from eight storage elements E1 to E8. First data is stored in E1, and subsequent data is stored in E2, E3, . . . in that order. When data is stored in storage element E8, next data is stored in storage element E1 by an overwrite operation.
Besides the interpreter-type numerical controller described above, Japanese Patent Application Laid-Open Nos. 61-161514 and 10-161729 disclose a numerical controller having an operation function based on binary data, which reads binary data stored in a memory in succession during an operation to execute the read binary data in an execution control part. While reading programs for binary data (path tables), created as text files, in succession before an operation starts, the numerical controller performs analysis and preprocessing in a preprocessing part, carries out a conversion into binary data, which is executable by the execution control part, in a conversion part in the numerical controller, and stores the converted binary data in the memory. The numerical controllers are of the compiler type because programs are converted into object code, which is binary data, in advance and the object code is executed at an execution time.
A text file is a file in which text (in alphanumeric characters and numerals) used to code cutting procedures executed by application programs is written. A binary file, which is coded with numerical data such as binary numbers, is paired with a text file. NC programs are text files.
The above operation function based on binary data is disclosed in, for example, Japanese Patent Application Laid-Open Nos. 59-177604 and 2003-303005. A numerical controller having this operation function has a so-called path table operation function by which a path table, in which positions of control axes are set with respect to time or a spindle position, is converted into binary data, the converted binary data is stored, and the stored binary data is read in succession to drive each control axis.
In many systems used in machining lines in factories, programs for binary data, created as text files and then stored and managed in a personal computer, are transferred to a numerical controller, converted into binary data in a conversion part in the numerical controller, and stored in a memory, and the binary data stored in the memory is operated.
Conversely, in a system often used when a standalone numerical controller, to which a personal computer or the like is not connected, is employed, programs for binary data that are created as text files and stored and managed in a memory card or USB memory connected to the numerical controller or in a non-volatile memory in the numerical controller are converted into binary data by a conversion part in the numerical controller, the converted binary data is transferred to and stored in another memory other than the non-volatile memory in the numerical controller, and the binary data stored in the other memory is operated.
Each system described above is problematic in that when it is operated with conventional binary data in such a way that after a first workpiece has been machined, a second workpiece is machined, the machining of the second workpiece must be awaited until a program for binary data, which is created as a text file transferred from the personal computer to the numerical controller or as a text file stored and managed in the USB card or in the volatile memory in the numerical controller, has been converted into binary data in the numerical controller and stored in the other memory. This problem can be solved by using a ring buffer in which old binary data that has been executed is overwritten with new binary data.
FIG. 10 illustrates a system that uses conventional tabular data (referred to below as the path table) for an operation.
A personal computer 10 creates path tables 12 needed for a path table operation. The created path tables 12 are stored on a hard disk 11. The path tables 12 stored on the hard disk 11 are transferred to a numerical controller 20. In FIG. 10, the personal computer and numerical controller are respectively denoted PC and CNC.
Each path table 12 transferred to the numerical controller 20 is converted by a conversion part 21 into binary data and stored in a memory 22 as binary data 220. While reading the binary data 220 stored in the memory 22 in succession, the numerical controller 20 executes the read binary data in an execution control part 23.
The above system is problematic in that when it is operated with conventional path tables in such a way that after a first workpiece has been machined, a second workpiece is machined, the machining of the second workpiece must be awaited until a path table for the second workpiece, which is stored and managed in the personal computer 10, has been transferred to and stored in the memory 22 in the numerical controller 20. This problem can be solved by using a ring buffer in which binary data in an old path table that has been operated is overwritten with binary data in a new path table.
A system using the ring buffer to overwrite machining programs also poses a problem in that if binary data in a path table is used a plurality of times for, for example, a skip operation, a retractive operation, a retrogradation, and a sub-program call, then a ring buffer which is designed so as not to leave any binary data in the path table that has been executed cannot be used.